﻿@model Back_end.Models.Company

@{
    ViewBag.Title = "编辑";
}

<h2>@ViewBag.Title </h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>公司</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
		<div class="form-group">
			@Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
			<div class="col-md-10">
				@Html.DisplayFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
			</div>
		</div>

        <div class="form-group">
            @Html.LabelFor(model => model.Introduction, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Introduction, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Introduction, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ImgPath, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
				<img src="@Model.ImgPath" class="img-thumbnail" /><br />
                @Html.EditorFor(model => model.ImgPath, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ImgPath, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Location, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Location, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Location, "", new { @class = "text-danger" })
            </div>
        </div>

		<div class="form-group">
			@Html.LabelFor(model => model.Coordinates, htmlAttributes: new { @class = "control-label col-md-2" })
			<div class="col-md-10">
				@Html.EditorFor(model => model.Coordinates, new { htmlAttributes = new { @class = "form-control" } })
				@Html.ValidationMessageFor(model => model.Coordinates, "", new { @class = "text-danger" })
			</div>
		</div>

        <div class="form-group">
            @Html.LabelFor(model => model.ComplaintCount, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ComplaintCount, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ComplaintCount, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Reviews, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Reviews, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Reviews, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="保存" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("返回列表", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
